from email.header import Header
from email.mime.text import MIMEText
from smtplib import SMTP

from networkx.convert_matrix import to_pandas_adjacency

fromAddr = 'caoyangyang@zhi-zai.cn'
password = 'Zhizaithomas0'

toAddr = '1076760287@qq.com'

smtpServer = 'smtp.exmail.qq.com'

server =  SMTP(smtpServer, 25)
server.set_debuglevel(1)
server.login(fromAddr, password)

msg = MIMEText('HELLO, send by python .....' , 'plain', 'utf-8')
msg['Subject'] = Header('smtp from zhizai', 'utf-8').encode()
msg['From'] = fromAddr
msg['To'] = toAddr


server.sendmail(fromAddr,[toAddr], msg.as_string() )
server.quit()